import pandas as pd
from sklearn.utils import Bunch
import numpy as np


def load_dataset(name):
    dataset = None
    if name == "HepTh":
        path = "../Data/HepTh.csv"
        data = pd.read_csv(path, header=None, skiprows=1)
        dataset = Bunch()
        dataset.data = np.array(data.iloc[:, 1:10])
        dataset.target = np.array(data.iloc[:, 10:11])[:, 0]
        dataset.DESCR = "样本数量：{}；特征数量：{}；目标值数量：{}；无缺失数据".format(
            data.index.size, data.columns.size - 2, 1)
        dataset.feature_names = ["score0", "score1", "score2", "score3", "score4",
                                 "score5", "score6", "score7", "score8"]
        dataset.target_names = ["contact"]

    return dataset
